home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
snip9707.zip
/
ANSISELF.C
< prev
next >
Wrap
C/C++ Source or Header
|
1997-07-05
|
457b
|
13 lines
/* +++Date last modified: 05-Jul-1997 */
/*
** Challenge: Write the smallest self-duplicating program, not
** reading the source file, which successfully exits and is strictly
** conforming Standard C.
**
** Public domain response by Thad Smith
*/
#include<stdio.h>
main(){char*c="\\\"#include<stdio.h>%cmain(){char*c=%c%c%c%.102s%cn%c;printf(c+2,c[102],c[1],*c,*c,c,*c,c[1]);exit(0);}\n";printf(c+2,c[102],c[1],*c,*c,c,*c,c[1]);exit(0);}